package org.koyi.singleton;

import java.util.ArrayList;
import java.util.List;

import org.koyi.entities.Bares;

public class BaresSingleton {

	private static BaresSingleton INSTANCE = null;
	
	
	private static List<Bares> listaBares;
	
	private BaresSingleton() 
	{
		 listaBares = new ArrayList<Bares>();
	}
	 
	// Creamos la instancia
    private synchronized static void createInstance() {
        if (INSTANCE == null) { 
            INSTANCE = new BaresSingleton();
        }
    }
    
    public static BaresSingleton getInstance() {
        createInstance();
        return INSTANCE;
    }

	public static List<Bares> getListaBares() {
		return listaBares;
	}

	public static void setListaBares(List<Bares> listaBares) {
		BaresSingleton.listaBares = listaBares;
	}
    
    
}
